package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.AttenEntity;
import me.idashu.attg.domain.UserEntity;
import me.idashu.attg.persistence.AttenMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AttenService {
	@Autowired
	private AttenMapper attenMapper;

	public void insertAttenEntity(AttenEntity attenEntity) {
		attenMapper.insertAttenEntity(attenEntity);
	}

	public void deleteAttenEntity(AttenEntity attenEntity) {
		attenMapper.deleteAttenEntity(attenEntity);
	}

	public List<UserEntity> findAttensByUserId(Map<String, Object> map) {
		List<UserEntity> attens = attenMapper.findAttensByUserId(map);
		return attens;
	}

	public int findCountAttensByUserId(AttenEntity attenEntity) {
		int count = attenMapper.findCountAttensByUserId(attenEntity);
		return count;
	}
}
